package com.ihisomp.controller;

import com.ihisomp.base.Result;
import com.ihisomp.dto.SysDeptFunctionDto;
import com.ihisomp.service.ISysDeptFunctionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 科室职能信息 前端控制器
 * </p>
 *
 * @author zy
 * @since 2022-04-06
 */
@RestController
@Api(value = "科室职能信息", tags = "科室职能信息")
@RequestMapping("/sysDeptFunction")
public class SysDeptFunctionController {

    Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private ISysDeptFunctionService sysDeptFunctionService;

    /**
     * 科室职能列表
     *
     * @param sysDeptFunctionDto
     * @return
     */
    @PostMapping("/list")
    @ApiOperation("科室职能数据")
    @ApiImplicitParam(name = "sysDeptFunctionDto", value = "科室职能数据类", required = true)
    public Result selectList(@RequestBody(required = false) SysDeptFunctionDto sysDeptFunctionDto) {
        logger.info("科室职能列表：sysDeptFunctionDto={}", sysDeptFunctionDto);
        Result result = sysDeptFunctionService.list(sysDeptFunctionDto);
        return result;
    }
}
